!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=264)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wc.wcSettings},function(e,t){e.exports=window.wc.wcBlocksData},function(e,t,n){var o;!function(){"use strict";var n={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var o=arguments[t];if(o){var s=typeof o;if("string"===s||"number"===s)e.push(o);else if(Array.isArray(o)){if(o.length){var i=r.apply(null,o);i&&e.push(i)}}else if("object"===s)if(o.toString===Object.prototype.toString)for(var c in o)n.call(o,c)&&o[c]&&e.push(c);else e.push(o.toString())}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(o=function(){return r}.apply(t,[]))||(e.exports=o)}()},function(e,t){e.exports=window.wp.data},,function(e,t){e.exports=window.lodash},function(e,t,n){"use strict";function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},o.apply(this,arguments)}n.d(t,"a",(function(){return o}))},function(e,t){e.exports=window.React},function(e,t){e.exports=window.wp.primitives},function(e,t){e.exports=window.wp.compose},function(e,t){e.exports=window.wc.blocksCheckout},function(e,t,n){var o=n(40);e.exports=function(e,t,n){return(t=o(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=window.wp.isShallowEqual},function(e,t){e.exports=window.wp.url},function(e,t){e.exports=window.wp.deprecated},function(e,t,n){"use strict";var o=n(13),r=n.n(o),s=n(0),i=n(1),c=n(30),a=({imageUrl:e=`${c.n}/block-error.svg`,header:t=Object(i.__)("Oops!","woocommerce"),text:n=Object(i.__)("There was an error loading the content.","woocommerce"),errorMessage:o,errorMessagePrefix:r=Object(i.__)("Error:","woocommerce"),button:a,showErrorBlock:l=!0})=>l?Object(s.createElement)("div",{className:"wc-block-error wc-block-components-error"},e&&Object(s.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:e,alt:""}),Object(s.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},t&&Object(s.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},t),n&&Object(s.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},n),o&&Object(s.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},r?r+" ":"",o),a&&Object(s.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},a))):null;n(42);class l extends s.Component{constructor(...e){super(...e),r()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(s.createElement)(s.Fragment,null,Object(s.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:n=!0,showErrorBlock:o=!0,text:r,errorMessagePrefix:i,renderError:c,button:l}=this.props,{errorMessage:u,hasError:d}=this.state;return d?"function"==typeof c?c({errorMessage:u}):Object(s.createElement)(a,{showErrorBlock:o,errorMessage:n?u:null,header:e,imageUrl:t,text:r,errorMessagePrefix:i,button:l}):this.props.children}}t.a=l},,function(e,t,n){"use strict";var o=n(0),r=n(4),s=n.n(r);t.a=({label:e,screenReaderLabel:t,wrapperElement:n,wrapperProps:r={}})=>{let i;const c=null!=e,a=null!=t;return!c&&a?(i=n||"span",r={...r,className:s()(r.className,"screen-reader-text")},Object(o.createElement)(i,{...r},t)):(i=n||o.Fragment,c&&a&&e!==t?Object(o.createElement)(i,{...r},Object(o.createElement)("span",{"aria-hidden":"true"},e),Object(o.createElement)("span",{className:"screen-reader-text"},t)):Object(o.createElement)(i,{...r},e))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return s}));var o=n(38);const r=e=>!Object(o.a)(e)&&e instanceof Object&&e.constructor===Object;function s(e,t){return r(e)&&t in e}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var o=n(0);const r=Object(o.createContext)("page"),s=()=>Object(o.useContext)(r);r.Provider},function(e,t){e.exports=window.wp.htmlEntities},function(e,t){e.exports=window.wp.keycodes},function(e,t){e.exports=window.wp.a11y},function(e,t,n){"use strict";(function(e){var o=n(0);n(46);const r=Object(o.createContext)({slots:{},fills:{},registerSlot:()=>{void 0!==e&&e.env},updateSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{}});t.a=r}).call(this,n(75))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var o=n(0),r=n(14),s=n.n(r);function i(e){const t=Object(o.useRef)(e);return s()(e,t.current)||(t.current=e),t.current}},function(e,t){function n(t){return e.exports=n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,n(t)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));const o=e=>"string"==typeof e},function(e,t,n){"use strict";n.d(t,"p",(function(){return s})),n.d(t,"n",(function(){return i})),n.d(t,"m",(function(){return c})),n.d(t,"o",(function(){return a})),n.d(t,"k",(function(){return l})),n.d(t,"d",(function(){return u})),n.d(t,"h",(function(){return d})),n.d(t,"l",(function(){return p})),n.d(t,"c",(function(){return f})),n.d(t,"g",(function(){return b})),n.d(t,"f",(function(){return m})),n.d(t,"a",(function(){return v})),n.d(t,"b",(function(){return O})),n.d(t,"i",(function(){return w})),n.d(t,"j",(function(){return j})),n.d(t,"e",(function(){return y}));var o,r=n(2);const s=Object(r.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),i=s.pluginUrl+"images/",c=s.pluginUrl+"build/",a=s.buildPhase,l=null===(o=r.STORE_PAGES.shop)||void 0===o?void 0:o.permalink,u=(r.STORE_PAGES.checkout.id,r.STORE_PAGES.checkout.permalink),d=r.STORE_PAGES.privacy.permalink,p=(r.STORE_PAGES.privacy.title,r.STORE_PAGES.terms.permalink),f=(r.STORE_PAGES.terms.title,r.STORE_PAGES.cart.id,r.STORE_PAGES.cart.permalink),b=r.STORE_PAGES.myaccount.permalink?r.STORE_PAGES.myaccount.permalink:Object(r.getSetting)("wpLoginUrl","/wp-login.php"),m=Object(r.getSetting)("localPickupEnabled",!1),h=Object(r.getSetting)("countries",{}),g=Object(r.getSetting)("countryData",{}),v=Object.fromEntries(Object.keys(g).filter((e=>!0===g[e].allowBilling)).map((e=>[e,h[e]||""]))),O=Object.fromEntries(Object.keys(g).filter((e=>!0===g[e].allowBilling)).map((e=>[e,g[e].states||[]]))),w=Object.fromEntries(Object.keys(g).filter((e=>!0===g[e].allowShipping)).map((e=>[e,h[e]||""]))),j=Object.fromEntries(Object.keys(g).filter((e=>!0===g[e].allowShipping)).map((e=>[e,g[e].states||[]]))),y=Object.fromEntries(Object.keys(g).map((e=>[e,g[e].locale||[]])))},function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return p})),n.d(t,"c",(function(){return f}));var o=n(3),r=n(5),s=n(0),i=n(14),c=n.n(i),a=n(27),l=n(54),u=n(22);const d=e=>{const t=Object(u.a)();e=e||t;const n=Object(r.useSelect)((t=>t(o.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)),[e]),{setValueForQueryContext:i}=Object(r.useDispatch)(o.QUERY_STATE_STORE_KEY);return[n,Object(s.useCallback)((t=>{i(e,t)}),[e,i])]},p=(e,t,n)=>{const i=Object(u.a)();n=n||i;const c=Object(r.useSelect)((r=>r(o.QUERY_STATE_STORE_KEY).getValueForQueryKey(n,e,t)),[n,e]),{setQueryValue:a}=Object(r.useDispatch)(o.QUERY_STATE_STORE_KEY);return[c,Object(s.useCallback)((t=>{a(n,e,t)}),[n,e,a])]},f=(e,t)=>{const n=Object(u.a)();t=t||n;const[o,r]=d(t),i=Object(a.a)(o),p=Object(a.a)(e),f=Object(l.a)(p),b=Object(s.useRef)(!1);return Object(s.useEffect)((()=>{c()(f,p)||(r(Object.assign({},i,p)),b.current=!0)}),[i,p,f,r]),b.current?[o,r]:[e,r]}},,,,,function(e,t,n){"use strict";var o=n(4),r=n.n(o),s=n(0);t.a=Object(s.forwardRef)((function({as:e="div",className:t,...n},o){return function({as:e="div",...t}){return"function"==typeof t.children?t.children(t):Object(s.createElement)(e,t)}({as:e,className:r()("components-visually-hidden",t),...n,ref:o})}))},,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));const o=e=>null===e},,function(e,t,n){var o=n(28).default,r=n(41);e.exports=function(e){var t=r(e,"string");return"symbol"===o(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var o=n(28).default;e.exports=function(e,t){if("object"!==o(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){},,function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return r}));var o=n(9);function r(e,t,n){var r=this,s=Object(o.useRef)(null),i=Object(o.useRef)(0),c=Object(o.useRef)(null),a=Object(o.useRef)([]),l=Object(o.useRef)(),u=Object(o.useRef)(),d=Object(o.useRef)(e),p=Object(o.useRef)(!0);Object(o.useEffect)((function(){d.current=e}),[e]);var f=!t&&0!==t&&"undefined"!=typeof window;if("function"!=typeof e)throw new TypeError("Expected a function");t=+t||0;var b=!!(n=n||{}).leading,m=!("trailing"in n)||!!n.trailing,h="maxWait"in n,g=h?Math.max(+n.maxWait||0,t):null;Object(o.useEffect)((function(){return p.current=!0,function(){p.current=!1}}),[]);var v=Object(o.useMemo)((function(){var e=function(e){var t=a.current,n=l.current;return a.current=l.current=null,i.current=e,u.current=d.current.apply(n,t)},n=function(e,t){f&&cancelAnimationFrame(c.current),c.current=f?requestAnimationFrame(e):setTimeout(e,t)},o=function(e){if(!p.current)return!1;var n=e-s.current;return!s.current||n>=t||n<0||h&&e-i.current>=g},v=function(t){return c.current=null,m&&a.current?e(t):(a.current=l.current=null,u.current)},O=function e(){var r=Date.now();if(o(r))return v(r);if(p.current){var c=t-(r-s.current),a=h?Math.min(c,g-(r-i.current)):c;n(e,a)}},w=function(){var d=Date.now(),f=o(d);if(a.current=[].slice.call(arguments),l.current=r,s.current=d,f){if(!c.current&&p.current)return i.current=s.current,n(O,t),b?e(s.current):u.current;if(h)return n(O,t),e(s.current)}return c.current||n(O,t),u.current};return w.cancel=function(){c.current&&(f?cancelAnimationFrame(c.current):clearTimeout(c.current)),i.current=0,a.current=s.current=l.current=c.current=null},w.isPending=function(){return!!c.current},w.flush=function(){return c.current?v(Date.now()):u.current},w}),[b,h,t,g,m,f]);return v}function s(e,t){return e===t}function i(e){return"function"==typeof e?function(){return e}:e}function c(e,t,n){var c,a,l=n&&n.equalityFn||s,u=(c=Object(o.useState)(i(e)),a=c[1],[c[0],Object(o.useCallback)((function(e){return a(i(e))}),[])]),d=u[0],p=u[1],f=r(Object(o.useCallback)((function(e){return p(e)}),[p]),t,n),b=Object(o.useRef)(e);return l(b.current,e)||(f(e),b.current=e),[d,f]}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var o=function(e){return function(t,n,o){return e(t,n,o)*o}},r=function(e,t){if(e)throw Error("Invalid sort config: "+t)},s=function(e){var t=e||{},n=t.asc,s=t.desc,i=n?1:-1,c=n||s;return r(!c,"Expected `asc` or `desc` property"),r(n&&s,"Ambiguous object with `asc` and `desc` config properties"),{order:i,sortBy:c,comparer:e.comparer&&o(e.comparer)}};function i(e,t,n){if(void 0===e||!0===e)return function(e,o){return t(e,o,n)};if("string"==typeof e)return r(e.includes("."),"String syntax not allowed for nested properties."),function(o,r){return t(o[e],r[e],n)};if("function"==typeof e)return function(o,r){return t(e(o),e(r),n)};if(Array.isArray(e)){var o=function(e){return function t(n,o,r,i,c,a,l){var u,d;if("string"==typeof n)u=a[n],d=l[n];else{if("function"!=typeof n){var p=s(n);return t(p.sortBy,o,r,p.order,p.comparer||e,a,l)}u=n(a),d=n(l)}var f=c(u,d,i);return(0===f||null==u&&null==d)&&o.length>r?t(o[r],o,r+1,i,c,a,l):f}}(t);return function(r,s){return o(e[0],e,1,n,t,r,s)}}var c=s(e);return i(c.sortBy,c.comparer||t,c.order)}var c=function(e,t,n,o){return Array.isArray(t)?(Array.isArray(n)&&n.length<2&&(n=n[0]),t.sort(i(n,o,e))):t};function a(e){var t=o(e.comparer);return function(n){var o=Array.isArray(n)&&!e.inPlaceSorting?n.slice():n;return{asc:function(e){return c(1,o,e,t)},desc:function(e){return c(-1,o,e,t)},by:function(e){return c(1,o,e,t)}}}}var l=function(e,t,n){return null==e?n:null==t?-n:typeof e!=typeof t?typeof e<typeof t?-1:1:e<t?-1:e>t?1:0},u=a({comparer:l});a({comparer:l,inPlaceSorting:!0})},function(e,t){e.exports=window.wp.warning},function(e,t){e.exports=window.wp.dom},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return s}));var o=n(0);const r=Object(o.createContext)({}),s=()=>{const{wrapper:e}=Object(o.useContext)(r);return t=>{e&&e.current&&(e.current.hidden=!t)}}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var o=n(0),r=n(17);const s=[".wp-block-woocommerce-cart"],i=({Block:e,containers:t,getProps:n=(()=>({})),getErrorBoundaryProps:s=(()=>({}))})=>{0!==t.length&&Array.prototype.forEach.call(t,((t,i)=>{const c=n(t,i),a=s(t,i),l={...t.dataset,...c.attributes||{}};(({Block:e,container:t,attributes:n={},props:s={},errorBoundaryProps:i={}})=>{Object(o.render)(Object(o.createElement)(r.a,{...i},Object(o.createElement)(o.Suspense,{fallback:Object(o.createElement)("div",{className:"wc-block-placeholder"})},e&&Object(o.createElement)(e,{...s,attributes:n}))),t,(()=>{t.classList&&t.classList.remove("is-loading")}))})({Block:e,container:t,props:c,attributes:l,errorBoundaryProps:a})}))},c=e=>{const t=document.body.querySelectorAll(s.join(",")),{Block:n,getProps:o,getErrorBoundaryProps:r,selector:c}=e;(({Block:e,getProps:t,getErrorBoundaryProps:n,selector:o,wrappers:r})=>{const s=document.body.querySelectorAll(o);r&&r.length>0&&Array.prototype.filter.call(s,(e=>!((e,t)=>Array.prototype.some.call(t,(t=>t.contains(e)&&!t.isSameNode(e))))(e,r))),i({Block:e,containers:s,getProps:t,getErrorBoundaryProps:n})})({Block:n,getProps:o,getErrorBoundaryProps:r,selector:c,wrappers:t}),Array.prototype.forEach.call(t,(t=>{t.addEventListener("wc-blocks_render_blocks_frontend",(()=>{(({Block:e,getProps:t,getErrorBoundaryProps:n,selector:o,wrapper:r})=>{const s=r.querySelectorAll(o);i({Block:e,containers:s,getProps:t,getErrorBoundaryProps:n})})({...e,wrapper:t})}))}))}},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var o=n(3),r=n(5),s=n(0),i=n(27);const c=e=>{const{namespace:t,resourceName:n,resourceValues:c=[],query:a={},shouldSelect:l=!0}=e;if(!t||!n)throw new Error("The options object must have valid values for the namespace and the resource properties.");const u=Object(s.useRef)({results:[],isLoading:!0}),d=Object(i.a)(a),p=Object(i.a)(c),f=(()=>{const[,e]=Object(s.useState)();return Object(s.useCallback)((t=>{e((()=>{throw t}))}),[])})(),b=Object(r.useSelect)((e=>{if(!l)return null;const r=e(o.COLLECTIONS_STORE_KEY),s=[t,n,d,p],i=r.getCollectionError(...s);if(i){if(!(i instanceof Error))throw new Error("TypeError: `error` object is not an instance of Error constructor");f(i)}return{results:r.getCollection(...s),isLoading:!r.hasFinishedResolution("getCollection",s)}}),[t,n,p,d,l]);return null!==b&&(u.current=b),u.current}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var o=n(0);function r(e,t){const n=Object(o.useRef)();return Object(o.useEffect)((()=>{n.current===e||t&&!t(e,n.current)||(n.current=e)}),[e,t]),n.current}},function(e,t,n){"use strict";var o=n(0),r=n(1),s=n(19);n(135),t.a=({name:e,count:t})=>Object(o.createElement)(o.Fragment,null,e,null!==t&&Number.isFinite(t)&&Object(o.createElement)(s.a,{label:t.toString(),screenReaderLabel:Object(r.sprintf)(/* translators: %s number of products. */
Object(r._n)("%s product","%s products",t,"woocommerce"),t),wrapperElement:"span",wrapperProps:{className:"wc-filter-element-label-list-count"}}))},,function(e,t,n){"use strict";var o=n(8),r=n(0),s=n(4),i=n.n(s),c=n(7),a=n(16),l=n.n(a),u=n(11),d=n(47),p=n(10),f=Object(r.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(p.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"})),b=n(1);function m(e,t,n){const{defaultView:o}=t,{frameElement:r}=o;if(!r||t===n.ownerDocument)return e;const s=r.getBoundingClientRect();return new o.DOMRect(e.left+s.left,e.top+s.top,e.width,e.height)}let h=0;function g(e){const t=document.scrollingElement||document.body;e&&(h=t.scrollTop);const n=e?"add":"remove";t.classList[n]("lockscroll"),document.documentElement.classList[n]("lockscroll"),e||(t.scrollTop=h)}let v=0;function O(){return Object(r.useEffect)((()=>(0===v&&g(!0),++v,()=>{1===v&&g(!1),--v})),[]),null}var w=n(26);function j(e){const t=Object(r.useContext)(w.a),n=t.slots[e]||{},o=t.fills[e],s=Object(r.useMemo)((()=>o||[]),[o]);return{...n,updateSlot:Object(r.useCallback)((n=>{t.updateSlot(e,n)}),[e,t.updateSlot]),unregisterSlot:Object(r.useCallback)((n=>{t.unregisterSlot(e,n)}),[e,t.unregisterSlot]),fills:s,registerFill:Object(r.useCallback)((n=>{t.registerFill(e,n)}),[e,t.registerFill]),unregisterFill:Object(r.useCallback)((n=>{t.unregisterFill(e,n)}),[e,t.unregisterFill])}}var y=Object(r.createContext)({registerSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{},getSlot:()=>{},getFills:()=>{},subscribe:()=>{}});function k({name:e,children:t,registerFill:n,unregisterFill:o}){const s=(e=>{const{getSlot:t,subscribe:n}=Object(r.useContext)(y),[o,s]=Object(r.useState)(t(e));return Object(r.useEffect)((()=>(s(t(e)),n((()=>{s(t(e))})))),[e]),o})(e),i=Object(r.useRef)({name:e,children:t});return Object(r.useLayoutEffect)((()=>(n(e,i.current),()=>o(e,i.current))),[]),Object(r.useLayoutEffect)((()=>{i.current.children=t,s&&s.forceUpdate()}),[t]),Object(r.useLayoutEffect)((()=>{e!==i.current.name&&(o(i.current.name,i.current),i.current.name=e,n(e,i.current))}),[e]),s&&s.node?(Object(c.isFunction)(t)&&(t=t(s.props.fillProps)),Object(r.createPortal)(t,s.node)):null}var E=e=>Object(r.createElement)(y.Consumer,null,(({registerFill:t,unregisterFill:n})=>Object(r.createElement)(k,Object(o.a)({},e,{registerFill:t,unregisterFill:n}))));class S extends r.Component{constructor(){super(...arguments),this.isUnmounted=!1,this.bindNode=this.bindNode.bind(this)}componentDidMount(){const{registerSlot:e}=this.props;e(this.props.name,this)}componentWillUnmount(){const{unregisterSlot:e}=this.props;this.isUnmounted=!0,e(this.props.name,this)}componentDidUpdate(e){const{name:t,unregisterSlot:n,registerSlot:o}=this.props;e.name!==t&&(n(e.name),o(t,this))}bindNode(e){this.node=e}forceUpdate(){this.isUnmounted||super.forceUpdate()}render(){const{children:e,name:t,fillProps:n={},getFills:o}=this.props,s=Object(c.map)(o(t,this),(e=>{const t=Object(c.isFunction)(e.children)?e.children(n):e.children;return r.Children.map(t,((e,t)=>{if(!e||Object(c.isString)(e))return e;const n=e.key||t;return Object(r.cloneElement)(e,{key:n})}))})).filter(Object(c.negate)(r.isEmptyElement));return Object(r.createElement)(r.Fragment,null,Object(c.isFunction)(e)?e(s):s)}}var _=e=>Object(r.createElement)(y.Consumer,null,(({registerSlot:t,unregisterSlot:n,getFills:s})=>Object(r.createElement)(S,Object(o.a)({},e,{registerSlot:t,unregisterSlot:n,getFills:s}))));function x(){const[,e]=Object(r.useState)({}),t=Object(r.useRef)(!0);return Object(r.useEffect)((()=>()=>{t.current=!1}),[]),()=>{t.current&&e({})}}function T({name:e,children:t}){const n=j(e),o=Object(r.useRef)({rerender:x()});return Object(r.useEffect)((()=>(n.registerFill(o),()=>{n.unregisterFill(o)})),[n.registerFill,n.unregisterFill]),n.ref&&n.ref.current?("function"==typeof t&&(t=t(n.fillProps)),Object(r.createPortal)(t,n.ref.current)):null}var C=Object(r.forwardRef)((function({name:e,fillProps:t={},as:n="div",...s},i){const c=Object(r.useContext)(w.a),a=Object(r.useRef)();return Object(r.useLayoutEffect)((()=>(c.registerSlot(e,a,t),()=>{c.unregisterSlot(e,a)})),[c.registerSlot,c.unregisterSlot,e]),Object(r.useLayoutEffect)((()=>{c.updateSlot(e,t)})),Object(r.createElement)(n,Object(o.a)({ref:Object(u.useMergeRefs)([i,a])},s))}));function L(e){return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(E,e),Object(r.createElement)(T,e))}n(14),r.Component;const I=Object(r.forwardRef)((({bubblesVirtually:e,...t},n)=>e?Object(r.createElement)(C,Object(o.a)({},t,{ref:n})):Object(r.createElement)(_,t)));function A(e){return"appear"===e?"top":"left"}const R="Popover";function P(e,t){const{paddingTop:n,paddingBottom:o,paddingLeft:r,paddingRight:s}=(i=t).ownerDocument.defaultView.getComputedStyle(i);var i;const c=n?parseInt(n,10):0,a=o?parseInt(o,10):0,l=r?parseInt(r,10):0,u=s?parseInt(s,10):0;return{x:e.left+l,y:e.top+c,width:e.width-l-u,height:e.height-c-a,left:e.left+l,right:e.right-u,top:e.top+c,bottom:e.bottom-a}}function F(e,t,n){n?e.getAttribute(t)!==n&&e.setAttribute(t,n):e.hasAttribute(t)&&e.removeAttribute(t)}function M(e,t,n=""){e.style[t]!==n&&(e.style[t]=n)}function N(e,t,n){n?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}const B=Object(r.forwardRef)((({headerTitle:e,onClose:t,children:n,className:s,noArrow:c=!0,isAlternate:a,position:p="bottom right",range:h,focusOnMount:g="firstElement",anchorRef:v,shouldAnchorIncludePadding:w,anchorRect:y,getAnchorRect:k,expandOnMobile:E,animate:S=!0,onClickOutside:_,onFocusOutside:x,__unstableStickyBoundaryElement:T,__unstableSlotName:C=R,__unstableObserveElement:I,__unstableBoundaryParent:B,__unstableForcePosition:D,__unstableForceXAlignment:V,...W},H)=>{const z=Object(r.useRef)(null),K=Object(r.useRef)(null),U=Object(r.useRef)(),$=Object(u.useViewportMatch)("medium","<"),[q,G]=Object(r.useState)(),Q=j(C),X=E&&$,[J,Z]=Object(u.useResizeObserver)();c=X||c,Object(r.useLayoutEffect)((()=>{if(X)return N(U.current,"is-without-arrow",c),N(U.current,"is-alternate",a),F(U.current,"data-x-axis"),F(U.current,"data-y-axis"),M(U.current,"top"),M(U.current,"left"),M(K.current,"maxHeight"),void M(K.current,"maxWidth");const e=()=>{if(!U.current||!K.current)return;let e=function(e,t,n,o=!1,r,s){if(t)return t;if(n){if(!e.current)return;const t=n(e.current);return m(t,t.ownerDocument||e.current.ownerDocument,s)}if(!1!==o){if(!(o&&window.Range&&window.Element&&window.DOMRect))return;if("function"==typeof(null==o?void 0:o.cloneRange))return m(Object(d.getRectangleFromRange)(o),o.endContainer.ownerDocument,s);if("function"==typeof(null==o?void 0:o.getBoundingClientRect)){const e=m(o.getBoundingClientRect(),o.ownerDocument,s);return r?e:P(e,o)}const{top:e,bottom:t}=o,n=e.getBoundingClientRect(),i=t.getBoundingClientRect(),c=m(new window.DOMRect(n.left,n.top,n.width,i.bottom-n.top),e.ownerDocument,s);return r?c:P(c,o)}if(!e.current)return;const{parentNode:i}=e.current,c=i.getBoundingClientRect();return r?c:P(c,i)}(z,y,k,v,w,U.current);if(!e)return;const{offsetParent:t,ownerDocument:n}=U.current;let o,r=0;if(t&&t!==n.body){const n=t.getBoundingClientRect();r=n.top,e=new window.DOMRect(e.left-n.left,e.top-n.top,e.width,e.height)}var s;B&&(o=null===(s=U.current.closest(".popover-slot"))||void 0===s?void 0:s.parentNode);const i=Z.height?Z:K.current.getBoundingClientRect(),{popoverTop:l,popoverLeft:u,xAxis:f,yAxis:h,contentHeight:g,contentWidth:O}=function(e,t,n="top",o,r,s,i,c,a){const[l,u="center",d]=n.split(" "),p=function(e,t,n,o,r,s,i,c){const{height:a}=t;if(r){const t=r.getBoundingClientRect().top+a-i;if(e.top<=t)return{yAxis:n,popoverTop:Math.min(e.bottom,t)}}let l=e.top+e.height/2;"bottom"===o?l=e.bottom:"top"===o&&(l=e.top);const u={popoverTop:l,contentHeight:(l-a/2>0?a/2:l)+(l+a/2>window.innerHeight?window.innerHeight-l:a/2)},d={popoverTop:e.top,contentHeight:e.top-10-a>0?a:e.top-10},p={popoverTop:e.bottom,contentHeight:e.bottom+10+a>window.innerHeight?window.innerHeight-10-e.bottom:a};let f,b=n,m=null;if(!r&&!c)if("middle"===n&&u.contentHeight===a)b="middle";else if("top"===n&&d.contentHeight===a)b="top";else if("bottom"===n&&p.contentHeight===a)b="bottom";else{b=d.contentHeight>p.contentHeight?"top":"bottom";const e="top"===b?d.contentHeight:p.contentHeight;m=e!==a?e:null}return f="middle"===b?u.popoverTop:"top"===b?d.popoverTop:p.popoverTop,{yAxis:b,popoverTop:f,contentHeight:m}}(e,t,l,d,o,0,s,c),f=function(e,t,n,o,r,s,i,c,a){const{width:l}=t;"left"===n&&Object(b.isRTL)()?n="right":"right"===n&&Object(b.isRTL)()&&(n="left"),"left"===o&&Object(b.isRTL)()?o="right":"right"===o&&Object(b.isRTL)()&&(o="left");const u=Math.round(e.left+e.width/2),d={popoverLeft:u,contentWidth:(u-l/2>0?l/2:u)+(u+l/2>window.innerWidth?window.innerWidth-u:l/2)};let p=e.left;"right"===o?p=e.right:"middle"===s||a||(p=u);let f=e.right;"left"===o?f=e.left:"middle"===s||a||(f=u);const m={popoverLeft:p,contentWidth:p-l>0?l:p},h={popoverLeft:f,contentWidth:f+l>window.innerWidth?window.innerWidth-f:l};let g,v=n,O=null;if(!r&&!c)if("center"===n&&d.contentWidth===l)v="center";else if("left"===n&&m.contentWidth===l)v="left";else if("right"===n&&h.contentWidth===l)v="right";else{v=m.contentWidth>h.contentWidth?"left":"right";const e="left"===v?m.contentWidth:h.contentWidth;l>window.innerWidth&&(O=window.innerWidth),e!==l&&(v="center",d.popoverLeft=window.innerWidth/2)}if(g="center"===v?d.popoverLeft:"left"===v?m.popoverLeft:h.popoverLeft,i){const e=i.getBoundingClientRect();g=Math.min(g,e.right-l),Object(b.isRTL)()||(g=Math.max(g,0))}return{xAxis:v,popoverLeft:g,contentWidth:O}}(e,t,u,d,o,p.yAxis,i,c,a);return{...f,...p}}(e,i,p,T,U.current,r,o,D,V);"number"==typeof l&&"number"==typeof u&&(M(U.current,"top",l+"px"),M(U.current,"left",u+"px")),N(U.current,"is-without-arrow",c||"center"===f&&"middle"===h),N(U.current,"is-alternate",a),F(U.current,"data-x-axis",f),F(U.current,"data-y-axis",h),M(K.current,"maxHeight","number"==typeof g?g+"px":""),M(K.current,"maxWidth","number"==typeof O?O+"px":""),G(({left:"right",right:"left"}[f]||"center")+" "+({top:"bottom",bottom:"top"}[h]||"middle"))};e();const{ownerDocument:t}=U.current,{defaultView:n}=t,o=n.setInterval(e,500);let r;const s=()=>{n.cancelAnimationFrame(r),r=n.requestAnimationFrame(e)};n.addEventListener("click",s),n.addEventListener("resize",e),n.addEventListener("scroll",e,!0);const i=function(e){if(e)return e.endContainer?e.endContainer.ownerDocument:e.top?e.top.ownerDocument:e.ownerDocument}(v);let l;return i&&i!==t&&(i.defaultView.addEventListener("resize",e),i.defaultView.addEventListener("scroll",e,!0)),I&&(l=new n.MutationObserver(e),l.observe(I,{attributes:!0})),()=>{n.clearInterval(o),n.removeEventListener("resize",e),n.removeEventListener("scroll",e,!0),n.removeEventListener("click",s),n.cancelAnimationFrame(r),i&&i!==t&&(i.defaultView.removeEventListener("resize",e),i.defaultView.removeEventListener("scroll",e,!0)),l&&l.disconnect()}}),[X,y,k,v,w,p,Z,T,I,B]);const ee=(e,n)=>{if("focus-outside"===e&&x)x(n);else if("focus-outside"===e&&_){const e=new window.MouseEvent("click");Object.defineProperty(e,"target",{get:()=>n.relatedTarget}),l()("Popover onClickOutside prop",{since:"5.3",alternative:"onFocusOutside"}),_(e)}else t&&t()},[te,ne]=Object(u.__experimentalUseDialog)({focusOnMount:g,__unstableOnClose:ee,onClose:ee}),oe=Object(u.useMergeRefs)([U,te,H]),re=Boolean(S&&q)&&function(e){if("loading"===e.type)return i()("components-animate__loading");const{type:t,origin:n=A(t)}=e;if("appear"===t){const[e,t="center"]=n.split(" ");return i()("components-animate__appear",{["is-from-"+t]:"center"!==t,["is-from-"+e]:"middle"!==e})}return"slide-in"===t?i()("components-animate__slide-in","is-from-"+n):void 0}({type:"appear",origin:q});let se=Object(r.createElement)("div",Object(o.a)({className:i()("components-popover",s,re,{"is-expanded":X,"is-without-arrow":c,"is-alternate":a})},W,{ref:oe},ne,{tabIndex:"-1"}),X&&Object(r.createElement)(O,null),X&&Object(r.createElement)("div",{className:"components-popover__header"},Object(r.createElement)("span",{className:"components-popover__header-title"},e),Object(r.createElement)(Y,{className:"components-popover__close",icon:f,onClick:t})),Object(r.createElement)("div",{ref:K,className:"components-popover__content"},Object(r.createElement)("div",{style:{position:"relative"}},J,n)));return Q.ref&&(se=Object(r.createElement)(L,{name:C},se)),v||y?se:Object(r.createElement)("span",{ref:z},se)}));B.Slot=Object(r.forwardRef)((function({name:e=R},t){return Object(r.createElement)(I,{bubblesVirtually:!0,name:e,className:"popover-slot",ref:t})}));var D=B,V=function({shortcut:e,className:t}){if(!e)return null;let n,o;return Object(c.isString)(e)&&(n=e),Object(c.isObject)(e)&&(n=e.display,o=e.ariaLabel),Object(r.createElement)("span",{className:t,"aria-label":o},n)};const W=Object(r.createElement)("div",{className:"event-catcher"}),H=({eventHandlers:e,child:t,childrenWithPopover:n})=>Object(r.cloneElement)(Object(r.createElement)("span",{className:"disabled-element-wrapper"},Object(r.cloneElement)(W,e),Object(r.cloneElement)(t,{children:n}),","),e),z=({child:e,eventHandlers:t,childrenWithPopover:n})=>Object(r.cloneElement)(e,{...t,children:n}),K=(e,t,n)=>{if(1!==r.Children.count(e))return;const o=r.Children.only(e);"function"==typeof o.props[t]&&o.props[t](n)};var U=function({children:e,position:t,text:n,shortcut:o}){const[s,i]=Object(r.useState)(!1),[a,l]=Object(r.useState)(!1),d=Object(u.useDebounce)(l,700),p=t=>{K(e,"onMouseDown",t),document.addEventListener("mouseup",m),i(!0)},f=t=>{K(e,"onMouseUp",t),document.removeEventListener("mouseup",m),i(!1)},b=e=>"mouseUp"===e?f:"mouseDown"===e?p:void 0,m=b("mouseUp"),h=(t,n)=>o=>{if(K(e,t,o),o.currentTarget.disabled)return;if("focus"===o.type&&s)return;d.cancel();const r=Object(c.includes)(["focus","mouseenter"],o.type);r!==a&&(n?d(r):l(r))},g=()=>{d.cancel(),document.removeEventListener("mouseup",m)};if(Object(r.useEffect)((()=>g),[]),1!==r.Children.count(e))return e;const v={onMouseEnter:h("onMouseEnter",!0),onMouseLeave:h("onMouseLeave"),onClick:h("onClick"),onFocus:h("onFocus"),onBlur:h("onBlur"),onMouseDown:b("mouseDown")},O=r.Children.only(e),{children:w,disabled:j}=O.props,y=j?H:z,k=(({grandchildren:e,isOver:t,position:n,text:o,shortcut:s})=>Object(r.concatChildren)(e,t&&Object(r.createElement)(D,{focusOnMount:!1,position:n,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},o,Object(r.createElement)(V,{className:"components-tooltip__shortcut",shortcut:s}))))({grandchildren:w,isOver:a,position:t,text:n,shortcut:o});return y({child:O,eventHandlers:v,childrenWithPopover:k})},$=function({icon:e,className:t,...n}){const s=["dashicon","dashicons","dashicons-"+e,t].filter(Boolean).join(" ");return Object(r.createElement)("span",Object(o.a)({className:s},n))},q=function({icon:e=null,size:t=24,...n}){if("string"==typeof e)return Object(r.createElement)($,Object(o.a)({icon:e},n));if(Object(r.isValidElement)(e)&&$===e.type)return Object(r.cloneElement)(e,{...n});if("function"==typeof e)return e.prototype instanceof r.Component?Object(r.createElement)(e,{size:t,...n}):e({size:t,...n});if(e&&("svg"===e.type||e.type===p.SVG)){const o={width:t,height:t,...e.props,...n};return Object(r.createElement)(p.SVG,o)}return Object(r.isValidElement)(e)?Object(r.cloneElement)(e,{size:t,...n}):e},G=n(36);const Q=["onMouseDown","onClick"];var Y=t.a=Object(r.forwardRef)((function(e,t){const{href:n,target:s,isSmall:a,isPressed:u,isBusy:d,isDestructive:p,className:f,disabled:b,icon:m,iconPosition:h="left",iconSize:g,showTooltip:v,tooltipPosition:O,shortcut:w,label:j,children:y,text:k,variant:E,__experimentalIsFocusable:S,describedBy:_,...x}=function({isDefault:e,isPrimary:t,isSecondary:n,isTertiary:o,isLink:r,variant:s,...i}){let c=s;var a,u,d,p,f;return t&&(null!==(a=c)&&void 0!==a||(c="primary")),o&&(null!==(u=c)&&void 0!==u||(c="tertiary")),n&&(null!==(d=c)&&void 0!==d||(c="secondary")),e&&(l()("Button isDefault prop",{since:"5.4",alternative:'variant="secondary"'}),null!==(p=c)&&void 0!==p||(c="secondary")),r&&(null!==(f=c)&&void 0!==f||(c="link")),{...i,variant:c}}(e),T=i()("components-button",f,{"is-secondary":"secondary"===E,"is-primary":"primary"===E,"is-small":a,"is-tertiary":"tertiary"===E,"is-pressed":u,"is-busy":d,"is-link":"link"===E,"is-destructive":p,"has-text":!!m&&!!y,"has-icon":!!m}),C=b&&!S,L=void 0===n||C?"button":"a",I="a"===L?{href:n,target:s}:{type:"button",disabled:C,"aria-pressed":u};if(b&&S){I["aria-disabled"]=!0;for(const e of Q)x[e]=e=>{e.stopPropagation(),e.preventDefault()}}const A=!C&&(v&&j||w||!!j&&(!y||Object(c.isArray)(y)&&!y.length)&&!1!==v),R=_?Object(c.uniqueId)():null,P=x["aria-describedby"]||R,F=Object(r.createElement)(L,Object(o.a)({},I,x,{className:T,"aria-label":x["aria-label"]||j,"aria-describedby":P,ref:t}),m&&"left"===h&&Object(r.createElement)(q,{icon:m,size:g}),k&&Object(r.createElement)(r.Fragment,null,k),m&&"right"===h&&Object(r.createElement)(q,{icon:m,size:g}),y);return A?Object(r.createElement)(r.Fragment,null,Object(r.createElement)(U,{text:_||j,shortcut:w,position:O},F),_&&Object(r.createElement)(G.a,null,Object(r.createElement)("span",{id:R},_))):Object(r.createElement)(r.Fragment,null,F,_&&Object(r.createElement)(G.a,null,Object(r.createElement)("span",{id:R},_)))}))},,,,function(e,t,n){"use strict";var o=n(0);n(89),t.a=({children:e})=>Object(o.createElement)("div",{className:"wc-block-filter-title-placeholder"},e)},function(e,t,n){"use strict";var o=n(0),r=n(1),s=n(4),i=n.n(s),c=n(19);n(90),t.a=({className:e,
/* translators: Reset button text for filters. */
label:t=Object(r.__)("Reset","woocommerce"),onClick:n,screenReaderLabel:s=Object(r.__)("Reset filter","woocommerce")})=>Object(o.createElement)("button",{className:i()("wc-block-components-filter-reset-button",e),onClick:n},Object(o.createElement)(c.a,{label:t,screenReaderLabel:s}))},function(e,t,n){"use strict";var o=n(0),r=n(1),s=n(4),i=n.n(s),c=n(19);n(91),t.a=({className:e,isLoading:t,disabled:n,
/* translators: Submit button text for filters. */
label:s=Object(r.__)("Apply","woocommerce"),onClick:a,screenReaderLabel:l=Object(r.__)("Apply filter","woocommerce")})=>Object(o.createElement)("button",{type:"submit",className:i()("wp-block-button__link","wc-block-filter-submit-button","wc-block-components-filter-submit-button",{"is-loading":t},e),disabled:n,onClick:a},Object(o.createElement)(c.a,{label:s,screenReaderLabel:l}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));const o=e=>"boolean"==typeof e},,,function(e,t,n){"use strict";n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return a})),n.d(t,"d",(function(){return l})),n.d(t,"c",(function(){return u})),n.d(t,"e",(function(){return d}));var o=n(15),r=n(2),s=n(64);const i=Object(r.getSettingWithCoercion)("isRenderingPhpTemplate",!1,s.a),c="query_type_",a="filter_";function l(e){return window?Object(o.getQueryArg)(window.location.href,e):null}function u(e){i?((e=e.replace(/(?:query-(?:\d+-)?page=(\d+))|(?:page\/(\d+))/g,"")).endsWith("?")&&(e=e.slice(0,-1)),window.location.href=e):window.history.replaceState({},"",e)}const d=e=>{const t=Object(o.getQueryArgs)(e);return Object(o.addQueryArgs)(e,t)}},,,,,,,,function(e,t){var n,o,r=e.exports={};function s(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function c(e){if(n===setTimeout)return setTimeout(e,0);if((n===s||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:s}catch(e){n=s}try{o="function"==typeof clearTimeout?clearTimeout:i}catch(e){o=i}}();var a,l=[],u=!1,d=-1;function p(){u&&a&&(u=!1,a.length?l=a.concat(l):d=-1,l.length&&f())}function f(){if(!u){var e=c(p);u=!0;for(var t=l.length;t;){for(a=l,l=[];++d<t;)a&&a[d].run();d=-1,t=l.length}a=null,u=!1,function(e){if(o===clearTimeout)return clearTimeout(e);if((o===i||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(e);try{return o(e)}catch(t){try{return o.call(null,e)}catch(t){return o.call(this,e)}}}(e)}}function b(e,t){this.fun=e,this.array=t}function m(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new b(e,t)),1!==l.length||u||c(f)},b.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=m,r.addListener=m,r.once=m,r.off=m,r.removeListener=m,r.removeAllListeners=m,r.emit=m,r.prependListener=m,r.prependOnceListener=m,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(e,t,n){"use strict";var o=n(0);t.a=function(e){let{icon:t,size:n=24,...r}=e;return Object(o.cloneElement)(t,{width:n,height:n,...r})}},,,,,function(e,t,n){"use strict";var o=n(8),r=n(0),s=n(4),i=n.n(s);class c extends r.Component{constructor(){super(...arguments),this.onChange=this.onChange.bind(this),this.bindInput=this.bindInput.bind(this)}focus(){this.input.focus()}hasFocus(){return this.input===this.input.ownerDocument.activeElement}bindInput(e){this.input=e}onChange(e){this.props.onChange({value:e.target.value})}render(){const{value:e,isExpanded:t,instanceId:n,selectedSuggestionIndex:s,className:c,...a}=this.props,l=e?e.length+1:0;return Object(r.createElement)("input",Object(o.a)({ref:this.bindInput,id:`components-form-token-input-${n}`,type:"text"},a,{value:e||"",onChange:this.onChange,size:l,className:i()(c,"components-form-token-field__input"),autoComplete:"off",role:"combobox","aria-expanded":t,"aria-autocomplete":"list","aria-owns":t?`components-form-token-suggestions-${n}`:void 0,"aria-activedescendant":-1!==s?`components-form-token-suggestions-${n}-${s}`:void 0,"aria-describedby":`components-form-token-suggestions-howto-${n}`}))}}t.a=c},function(e,t,n){"use strict";var o=n(0),r=n(7),s=n(83),i=n.n(s),c=n(4),a=n.n(c),l=n(11);class u extends o.Component{constructor(){super(...arguments),this.handleMouseDown=this.handleMouseDown.bind(this),this.bindList=this.bindList.bind(this)}componentDidUpdate(){this.props.selectedIndex>-1&&this.props.scrollIntoView&&this.list.children[this.props.selectedIndex]&&(this.scrollingIntoView=!0,i()(this.list.children[this.props.selectedIndex],this.list,{onlyScrollIfNeeded:!0}),this.props.setTimeout((()=>{this.scrollingIntoView=!1}),100))}bindList(e){this.list=e}handleHover(e){return()=>{this.scrollingIntoView||this.props.onHover(e)}}handleClick(e){return()=>{this.props.onSelect(e)}}handleMouseDown(e){e.preventDefault()}computeSuggestionMatch(e){const t=this.props.displayTransform(this.props.match||"").toLocaleLowerCase();if(0===t.length)return null;const n=(e=this.props.displayTransform(e)).toLocaleLowerCase().indexOf(t);return{suggestionBeforeMatch:e.substring(0,n),suggestionMatch:e.substring(n,n+t.length),suggestionAfterMatch:e.substring(n+t.length)}}render(){return Object(o.createElement)("ul",{ref:this.bindList,className:"components-form-token-field__suggestions-list",id:`components-form-token-suggestions-${this.props.instanceId}`,role:"listbox"},Object(r.map)(this.props.suggestions,((e,t)=>{const n=this.computeSuggestionMatch(e),r=a()("components-form-token-field__suggestion",{"is-selected":t===this.props.selectedIndex});return Object(o.createElement)("li",{id:`components-form-token-suggestions-${this.props.instanceId}-${t}`,role:"option",className:r,key:null!=e&&e.value?e.value:this.props.displayTransform(e),onMouseDown:this.handleMouseDown,onClick:this.handleClick(e),onMouseEnter:this.handleHover(e),"aria-selected":t===this.props.selectedIndex},n?Object(o.createElement)("span",{"aria-label":this.props.displayTransform(e)},n.suggestionBeforeMatch,Object(o.createElement)("strong",{className:"components-form-token-field__suggestion-match"},n.suggestionMatch),n.suggestionAfterMatch):this.props.displayTransform(e))})))}}u.defaultProps={match:"",onHover:()=>{},onSelect:()=>{},suggestions:Object.freeze([])},t.a=Object(l.withSafeTimeout)(u)},function(e,t,n){"use strict";e.exports=n(115)},,function(e,t,n){"use strict";var o=n(0),r=n(127),s=n(4),i=n.n(s);n(117),t.a=({className:e,style:t,suggestions:n,multiple:s=!0,saveTransform:c=(e=>e.trim().replace(/\s/g,"-")),messages:a={},validateInput:l=(e=>n.includes(e)),label:u="",...d})=>Object(o.createElement)("div",{className:i()("wc-blocks-components-form-token-field-wrapper",e,{"single-selection":!s}),style:t},Object(o.createElement)(r.a,{label:u,__experimentalExpandOnFocus:!0,__experimentalShowHowTo:!1,__experimentalValidateInput:l,saveTransform:c,maxLength:s?void 0:1,suggestions:n,messages:a,...d}))},function(e,t,n){"use strict";var o=n(0),r=n(1),s=n(4),i=n.n(s),c=n(12);n(118),t.a=({className:e,onChange:t,options:n=[],checked:s=[],isLoading:a=!1,isDisabled:l=!1,limit:u=10})=>{const[d,p]=Object(o.useState)(!1),f=Object(o.useMemo)((()=>[...Array(5)].map(((e,t)=>Object(o.createElement)("li",{key:t,style:{width:Math.floor(75*Math.random())+25+"%"}})))),[]),b=Object(o.useMemo)((()=>{const e=n.length-u;return!d&&Object(o.createElement)("li",{key:"show-more",className:"show-more"},Object(o.createElement)("button",{onClick:()=>{p(!0)},"aria-expanded":!1,"aria-label":Object(r.sprintf)(/* translators: %s is referring the remaining count of options */
Object(r._n)("Show %s more option","Show %s more options",e,"woocommerce"),e)},Object(r.sprintf)(/* translators: %s number of options to reveal. */
Object(r._n)("Show %s more","Show %s more",e,"woocommerce"),e)))}),[n,u,d]),m=Object(o.useMemo)((()=>d&&Object(o.createElement)("li",{key:"show-less",className:"show-less"},Object(o.createElement)("button",{onClick:()=>{p(!1)},"aria-expanded":!0,"aria-label":Object(r.__)("Show less options","woocommerce")},Object(r.__)("Show less","woocommerce")))),[d]),h=Object(o.useMemo)((()=>{const e=n.length>u+5;return Object(o.createElement)(o.Fragment,null,n.map(((n,r)=>Object(o.createElement)(o.Fragment,{key:n.value},Object(o.createElement)("li",{...e&&!d&&r>=u&&{hidden:!0}},Object(o.createElement)(c.CheckboxControl,{id:n.value,className:"wc-block-checkbox-list__checkbox",label:n.label,checked:s.includes(n.value),onChange:()=>{t(n.value)},disabled:l})),e&&r===u-1&&b))),e&&m)}),[n,t,s,d,u,m,b,l]),g=i()("wc-block-checkbox-list","wc-block-components-checkbox-list",{"is-loading":a},e);return Object(o.createElement)("ul",{className:g},a?f:h)}},,,function(e,t){},function(e,t){},function(e,t){},,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return a})),n.d(t,"d",(function(){return l}));var o=n(29),r=n(67),s=n(131);const i=(e,t="filter_stock_status")=>{const n=Object(r.d)(t);if(!n)return[];const s=Object(o.a)(n)?n.split(","):n,i=Object.keys(e);return s.filter((e=>i.includes(e)))};function c(){return Math.floor(Math.random()*Date.now())}const a=e=>e.trim().replace(/\s/g,"").replace(/_/g,"-").replace(/-+/g,"-").replace(/[^a-zA-Z0-9-]/g,""),l=e=>({heading:Object(o.a)(null==e?void 0:e.heading)?e.heading:"",headingLevel:Object(o.a)(null==e?void 0:e.headingLevel)&&parseInt(e.headingLevel,10)||s.attributes.headingLevel.default,showFilterButton:"true"===(null==e?void 0:e.showFilterButton),showCounts:"true"===(null==e?void 0:e.showCounts),isPreview:!1,displayStyle:Object(o.a)(null==e?void 0:e.displayStyle)&&e.displayStyle||s.attributes.displayStyle.default,selectType:Object(o.a)(null==e?void 0:e.selectType)&&e.selectType||s.attributes.selectType.default})},,,,,,,function(e,t,n){"use strict";var o=n(116);e.exports=function(e,t,n){n=n||{},9===t.nodeType&&(t=o.getWindow(t));var r=n.allowHorizontalScroll,s=n.onlyScrollIfNeeded,i=n.alignWithTop,c=n.alignWithLeft,a=n.offsetTop||0,l=n.offsetLeft||0,u=n.offsetBottom||0,d=n.offsetRight||0;r=void 0===r||r;var p=o.isWindow(t),f=o.offset(e),b=o.outerHeight(e),m=o.outerWidth(e),h=void 0,g=void 0,v=void 0,O=void 0,w=void 0,j=void 0,y=void 0,k=void 0,E=void 0,S=void 0;p?(y=t,S=o.height(y),E=o.width(y),k={left:o.scrollLeft(y),top:o.scrollTop(y)},w={left:f.left-k.left-l,top:f.top-k.top-a},j={left:f.left+m-(k.left+E)+d,top:f.top+b-(k.top+S)+u},O=k):(h=o.offset(t),g=t.clientHeight,v=t.clientWidth,O={left:t.scrollLeft,top:t.scrollTop},w={left:f.left-(h.left+(parseFloat(o.css(t,"borderLeftWidth"))||0))-l,top:f.top-(h.top+(parseFloat(o.css(t,"borderTopWidth"))||0))-a},j={left:f.left+m-(h.left+v+(parseFloat(o.css(t,"borderRightWidth"))||0))+d,top:f.top+b-(h.top+g+(parseFloat(o.css(t,"borderBottomWidth"))||0))+u}),w.top<0||j.top>0?!0===i?o.scrollTop(t,O.top+w.top):!1===i?o.scrollTop(t,O.top+j.top):w.top<0?o.scrollTop(t,O.top+w.top):o.scrollTop(t,O.top+j.top):s||((i=void 0===i||!!i)?o.scrollTop(t,O.top+w.top):o.scrollTop(t,O.top+j.top)),r&&(w.left<0||j.left>0?!0===c?o.scrollLeft(t,O.left+w.left):!1===c?o.scrollLeft(t,O.left+j.left):w.left<0?o.scrollLeft(t,O.left+w.left):o.scrollLeft(t,O.left+j.left):s||((c=void 0===c||!!c)?o.scrollLeft(t,O.left+w.left):o.scrollLeft(t,O.left+j.left)))}},function(e,t,n){"use strict";var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function s(e,t){var n=e["page"+(t?"Y":"X")+"Offset"],o="scroll"+(t?"Top":"Left");if("number"!=typeof n){var r=e.document;"number"!=typeof(n=r.documentElement[o])&&(n=r.body[o])}return n}function i(e){return s(e)}function c(e){return s(e,!0)}function a(e){var t=function(e){var t,n=void 0,o=void 0,r=e.ownerDocument,s=r.body,i=r&&r.documentElement;return n=(t=e.getBoundingClientRect()).left,o=t.top,{left:n-=i.clientLeft||s.clientLeft||0,top:o-=i.clientTop||s.clientTop||0}}(e),n=e.ownerDocument,o=n.defaultView||n.parentWindow;return t.left+=i(o),t.top+=c(o),t}var l=new RegExp("^("+/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source+")(?!px)[a-z%]+$","i"),u=/^(top|right|bottom|left)$/,d="currentStyle",p="runtimeStyle",f="left",b=void 0;function m(e,t){for(var n=0;n<e.length;n++)t(e[n])}function h(e){return"border-box"===b(e,"boxSizing")}"undefined"!=typeof window&&(b=window.getComputedStyle?function(e,t,n){var o="",r=e.ownerDocument,s=n||r.defaultView.getComputedStyle(e,null);return s&&(o=s.getPropertyValue(t)||s[t]),o}:function(e,t){var n=e[d]&&e[d][t];if(l.test(n)&&!u.test(t)){var o=e.style,r=o[f],s=e[p][f];e[p][f]=e[d][f],o[f]="fontSize"===t?"1em":n||0,n=o.pixelLeft+"px",o[f]=r,e[p][f]=s}return""===n?"auto":n});var g=["margin","border","padding"],v=-1,O=2,w=1;function j(e,t,n){var o=0,r=void 0,s=void 0,i=void 0;for(s=0;s<t.length;s++)if(r=t[s])for(i=0;i<n.length;i++){var c;c="border"===r?r+n[i]+"Width":r+n[i],o+=parseFloat(b(e,c))||0}return o}function y(e){return null!=e&&e==e.window}var k={};function E(e,t,n){if(y(e))return"width"===t?k.viewportWidth(e):k.viewportHeight(e);if(9===e.nodeType)return"width"===t?k.docWidth(e):k.docHeight(e);var o="width"===t?["Left","Right"]:["Top","Bottom"],r="width"===t?e.offsetWidth:e.offsetHeight,s=(b(e),h(e)),i=0;(null==r||r<=0)&&(r=void 0,(null==(i=b(e,t))||Number(i)<0)&&(i=e.style[t]||0),i=parseFloat(i)||0),void 0===n&&(n=s?w:v);var c=void 0!==r||s,a=r||i;if(n===v)return c?a-j(e,["border","padding"],o):i;if(c){var l=n===O?-j(e,["border"],o):j(e,["margin"],o);return a+(n===w?0:l)}return i+j(e,g.slice(n),o)}m(["Width","Height"],(function(e){k["doc"+e]=function(t){var n=t.document;return Math.max(n.documentElement["scroll"+e],n.body["scroll"+e],k["viewport"+e](n))},k["viewport"+e]=function(t){var n="client"+e,o=t.document,r=o.body,s=o.documentElement[n];return"CSS1Compat"===o.compatMode&&s||r&&r[n]||s}}));var S={position:"absolute",visibility:"hidden",display:"block"};function _(e){var t=void 0,n=arguments;return 0!==e.offsetWidth?t=E.apply(void 0,n):function(e,o,r){var s={},i=e.style,c=void 0;for(c in o)o.hasOwnProperty(c)&&(s[c]=i[c],i[c]=o[c]);for(c in function(){t=E.apply(void 0,n)}.call(e),o)o.hasOwnProperty(c)&&(i[c]=s[c])}(e,S),t}function x(e,t,n){var o=n;if("object"!==(void 0===t?"undefined":r(t)))return void 0!==o?("number"==typeof o&&(o+="px"),void(e.style[t]=o)):b(e,t);for(var s in t)t.hasOwnProperty(s)&&x(e,s,t[s])}m(["width","height"],(function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);k["outer"+t]=function(t,n){return t&&_(t,e,n?0:w)};var n="width"===e?["Left","Right"]:["Top","Bottom"];k[e]=function(t,o){return void 0===o?t&&_(t,e,v):t?(b(t),h(t)&&(o+=j(t,["padding","border"],n)),x(t,e,o)):void 0}})),e.exports=o({getWindow:function(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow},offset:function(e,t){if(void 0===t)return a(e);!function(e,t){"static"===x(e,"position")&&(e.style.position="relative");var n=a(e),o={},r=void 0,s=void 0;for(s in t)t.hasOwnProperty(s)&&(r=parseFloat(x(e,s))||0,o[s]=r+t[s]-n[s]);x(e,o)}(e,t)},isWindow:y,each:m,css:x,clone:function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);if(e.overflow)for(var n in e)e.hasOwnProperty(n)&&(t.overflow[n]=e.overflow[n]);return t},scrollLeft:function(e,t){if(y(e)){if(void 0===t)return i(e);window.scrollTo(t,c(e))}else{if(void 0===t)return e.scrollLeft;e.scrollLeft=t}},scrollTop:function(e,t){if(y(e)){if(void 0===t)return c(e);window.scrollTo(i(e),t)}else{if(void 0===t)return e.scrollTop;e.scrollTop=t}},viewportWidth:0,viewportHeight:0},k)},function(e,t){},function(e,t){},,,,,,,,,function(e,t,n){"use strict";var o=n(0),r=n(7),s=n(4),i=n.n(s),c=n(1),a=n(11),l=n(24),u=n(14),d=n.n(u),p=n(149),f=n(57),b=n(36);function m({value:e,status:t,title:n,displayTransform:s,isBorderless:l=!1,disabled:u=!1,onClickRemove:d=r.noop,onMouseEnter:h,onMouseLeave:g,messages:v,termPosition:O,termsCount:w}){const j=Object(a.useInstanceId)(m),y=i()("components-form-token-field__token",{"is-error":"error"===t,"is-success":"success"===t,"is-validating":"validating"===t,"is-borderless":l,"is-disabled":u}),k=s(e),E=Object(c.sprintf)(
/* translators: 1: term name, 2: term position in a set of terms, 3: total term set count. */
Object(c.__)("%1$s (%2$s of %3$s)"),k,O,w);return Object(o.createElement)("span",{className:y,onMouseEnter:h,onMouseLeave:g,title:n},Object(o.createElement)("span",{className:"components-form-token-field__token-text",id:`components-form-token-field__token-text-${j}`},Object(o.createElement)(b.a,{as:"span"},E),Object(o.createElement)("span",{"aria-hidden":"true"},k)),Object(o.createElement)(f.a,{className:"components-form-token-field__remove-token",icon:p.a,onClick:!u&&(()=>d({value:e})),label:v.remove,"aria-describedby":`components-form-token-field__token-text-${j}`}))}var h=n(81),g=n(82),v=n(8),O=n(25),w=Object(a.createHigherOrderComponent)((e=>t=>Object(o.createElement)(e,Object(v.a)({},t,{speak:O.speak,debouncedSpeak:Object(a.useDebounce)(O.speak,500)}))),"withSpokenMessages");const j={incompleteTokenValue:"",inputOffsetFromEnd:0,isActive:!1,isExpanded:!1,selectedSuggestionIndex:-1,selectedSuggestionScroll:!1};class y extends o.Component{constructor(){super(...arguments),this.state=j,this.onKeyDown=this.onKeyDown.bind(this),this.onKeyPress=this.onKeyPress.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),this.deleteTokenBeforeInput=this.deleteTokenBeforeInput.bind(this),this.deleteTokenAfterInput=this.deleteTokenAfterInput.bind(this),this.addCurrentToken=this.addCurrentToken.bind(this),this.onContainerTouched=this.onContainerTouched.bind(this),this.renderToken=this.renderToken.bind(this),this.onTokenClickRemove=this.onTokenClickRemove.bind(this),this.onSuggestionHovered=this.onSuggestionHovered.bind(this),this.onSuggestionSelected=this.onSuggestionSelected.bind(this),this.onInputChange=this.onInputChange.bind(this),this.bindInput=this.bindInput.bind(this),this.bindTokensAndInput=this.bindTokensAndInput.bind(this),this.updateSuggestions=this.updateSuggestions.bind(this)}componentDidUpdate(e){this.state.isActive&&!this.input.hasFocus()&&this.input.focus();const{suggestions:t,value:n}=this.props,o=!d()(t,e.suggestions);(o||n!==e.value)&&this.updateSuggestions(o)}static getDerivedStateFromProps(e,t){return e.disabled&&t.isActive?{isActive:!1,incompleteTokenValue:""}:null}bindInput(e){this.input=e}bindTokensAndInput(e){this.tokensAndInput=e}onFocus(e){const{__experimentalExpandOnFocus:t}=this.props;this.input.hasFocus()||e.target===this.tokensAndInput?this.setState({isActive:!0,isExpanded:!!t||this.state.isExpanded}):this.setState({isActive:!1}),"function"==typeof this.props.onFocus&&this.props.onFocus(e)}onBlur(){this.inputHasValidValue()?this.setState({isActive:!1}):this.setState(j)}onKeyDown(e){let t=!1;switch(e.keyCode){case l.BACKSPACE:t=this.handleDeleteKey(this.deleteTokenBeforeInput);break;case l.ENTER:t=this.addCurrentToken();break;case l.LEFT:t=this.handleLeftArrowKey();break;case l.UP:t=this.handleUpArrowKey();break;case l.RIGHT:t=this.handleRightArrowKey();break;case l.DOWN:t=this.handleDownArrowKey();break;case l.DELETE:t=this.handleDeleteKey(this.deleteTokenAfterInput);break;case l.SPACE:this.props.tokenizeOnSpace&&(t=this.addCurrentToken());break;case l.ESCAPE:t=this.handleEscapeKey(e),e.stopPropagation()}t&&e.preventDefault()}onKeyPress(e){let t=!1;44===e.charCode&&(t=this.handleCommaKey()),t&&e.preventDefault()}onContainerTouched(e){e.target===this.tokensAndInput&&this.state.isActive&&e.preventDefault()}onTokenClickRemove(e){this.deleteToken(e.value),this.input.focus()}onSuggestionHovered(e){const t=this.getMatchingSuggestions().indexOf(e);t>=0&&this.setState({selectedSuggestionIndex:t,selectedSuggestionScroll:!1})}onSuggestionSelected(e){this.addNewToken(e)}onInputChange(e){const t=e.value,n=this.props.tokenizeOnSpace?/[ ,\t]+/:/[,\t]+/,o=t.split(n),s=Object(r.last)(o)||"";o.length>1&&this.addNewTokens(o.slice(0,-1)),this.setState({incompleteTokenValue:s},this.updateSuggestions),this.props.onInputChange(s)}handleDeleteKey(e){let t=!1;return this.input.hasFocus()&&this.isInputEmpty()&&(e(),t=!0),t}handleLeftArrowKey(){let e=!1;return this.isInputEmpty()&&(this.moveInputBeforePreviousToken(),e=!0),e}handleRightArrowKey(){let e=!1;return this.isInputEmpty()&&(this.moveInputAfterNextToken(),e=!0),e}handleUpArrowKey(){return this.setState(((e,t)=>({selectedSuggestionIndex:(0===e.selectedSuggestionIndex?this.getMatchingSuggestions(e.incompleteTokenValue,t.suggestions,t.value,t.maxSuggestions,t.saveTransform).length:e.selectedSuggestionIndex)-1,selectedSuggestionScroll:!0}))),!0}handleDownArrowKey(){return this.setState(((e,t)=>({selectedSuggestionIndex:(e.selectedSuggestionIndex+1)%this.getMatchingSuggestions(e.incompleteTokenValue,t.suggestions,t.value,t.maxSuggestions,t.saveTransform).length,selectedSuggestionScroll:!0}))),!0}handleEscapeKey(e){return this.setState({incompleteTokenValue:e.target.value,isExpanded:!1,selectedSuggestionIndex:-1,selectedSuggestionScroll:!1}),!0}handleCommaKey(){return this.inputHasValidValue()&&this.addNewToken(this.state.incompleteTokenValue),!0}moveInputToIndex(e){this.setState(((t,n)=>({inputOffsetFromEnd:n.value.length-Math.max(e,-1)-1})))}moveInputBeforePreviousToken(){this.setState(((e,t)=>({inputOffsetFromEnd:Math.min(e.inputOffsetFromEnd+1,t.value.length)})))}moveInputAfterNextToken(){this.setState((e=>({inputOffsetFromEnd:Math.max(e.inputOffsetFromEnd-1,0)})))}deleteTokenBeforeInput(){const e=this.getIndexOfInput()-1;e>-1&&this.deleteToken(this.props.value[e])}deleteTokenAfterInput(){const e=this.getIndexOfInput();e<this.props.value.length&&(this.deleteToken(this.props.value[e]),this.moveInputToIndex(e))}addCurrentToken(){let e=!1;const t=this.getSelectedSuggestion();return t?(this.addNewToken(t),e=!0):this.inputHasValidValue()&&(this.addNewToken(this.state.incompleteTokenValue),e=!0),e}addNewTokens(e){const t=Object(r.uniq)(e.map(this.props.saveTransform).filter(Boolean).filter((e=>!this.valueContainsToken(e))));if(t.length>0){const e=Object(r.clone)(this.props.value);e.splice.apply(e,[this.getIndexOfInput(),0].concat(t)),this.props.onChange(e)}}addNewToken(e){const{__experimentalExpandOnFocus:t,__experimentalValidateInput:n}=this.props;n(e)?(this.addNewTokens([e]),this.props.speak(this.props.messages.added,"assertive"),this.setState({incompleteTokenValue:"",selectedSuggestionIndex:-1,selectedSuggestionScroll:!1,isExpanded:!t}),this.state.isActive&&this.input.focus()):this.props.speak(this.props.messages.__experimentalInvalid,"assertive")}deleteToken(e){const t=this.props.value.filter((t=>this.getTokenValue(t)!==this.getTokenValue(e)));this.props.onChange(t),this.props.speak(this.props.messages.removed,"assertive")}getTokenValue(e){return"object"==typeof e?e.value:e}getMatchingSuggestions(e=this.state.incompleteTokenValue,t=this.props.suggestions,n=this.props.value,o=this.props.maxSuggestions,s=this.props.saveTransform){let i=s(e);const c=[],a=[];return 0===i.length?t=Object(r.difference)(t,n):(i=i.toLocaleLowerCase(),Object(r.each)(t,(e=>{const t=e.toLocaleLowerCase().indexOf(i);-1===n.indexOf(e)&&(0===t?c.push(e):t>0&&a.push(e))})),t=c.concat(a)),Object(r.take)(t,o)}getSelectedSuggestion(){if(-1!==this.state.selectedSuggestionIndex)return this.getMatchingSuggestions()[this.state.selectedSuggestionIndex]}valueContainsToken(e){return Object(r.some)(this.props.value,(t=>this.getTokenValue(e)===this.getTokenValue(t)))}getIndexOfInput(){return this.props.value.length-this.state.inputOffsetFromEnd}isInputEmpty(){return 0===this.state.incompleteTokenValue.length}inputHasValidValue(){return this.props.saveTransform(this.state.incompleteTokenValue).length>0}updateSuggestions(e=!0){const{__experimentalExpandOnFocus:t}=this.props,{incompleteTokenValue:n}=this.state,o=n.trim().length>1,r=this.getMatchingSuggestions(n),s=r.length>0,i={isExpanded:t||o&&s};if(e&&(i.selectedSuggestionIndex=-1,i.selectedSuggestionScroll=!1),this.setState(i),o){const{debouncedSpeak:e}=this.props;e(s?Object(c.sprintf)(
/* translators: %d: number of results. */
Object(c._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",r.length),r.length):Object(c.__)("No results."),"assertive")}}renderTokensAndInput(){const e=Object(r.map)(this.props.value,this.renderToken);return e.splice(this.getIndexOfInput(),0,this.renderInput()),e}renderToken(e,t,n){const r=this.getTokenValue(e),s=e.status?e.status:void 0,i=t+1,c=n.length;return Object(o.createElement)(m,{key:"token-"+r,value:r,status:s,title:e.title,displayTransform:this.props.displayTransform,onClickRemove:this.onTokenClickRemove,isBorderless:e.isBorderless||this.props.isBorderless,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,disabled:"error"!==s&&this.props.disabled,messages:this.props.messages,termsCount:c,termPosition:i})}renderInput(){const{autoCapitalize:e,autoComplete:t,maxLength:n,placeholder:r,value:s,instanceId:i}=this.props;let c={instanceId:i,autoCapitalize:e,autoComplete:t,placeholder:0===s.length?r:"",ref:this.bindInput,key:"input",disabled:this.props.disabled,value:this.state.incompleteTokenValue,onBlur:this.onBlur,isExpanded:this.state.isExpanded,selectedSuggestionIndex:this.state.selectedSuggestionIndex};return n&&s.length>=n||(c={...c,onChange:this.onInputChange}),Object(o.createElement)(h.a,c)}render(){const{disabled:e,label:t=Object(c.__)("Add item"),instanceId:n,className:r,__experimentalShowHowTo:s}=this.props,{isExpanded:a}=this.state,l=i()(r,"components-form-token-field__input-container",{"is-active":this.state.isActive,"is-disabled":e});let u={className:"components-form-token-field",tabIndex:"-1"};const d=this.getMatchingSuggestions();return e||(u=Object.assign({},u,{onKeyDown:this.onKeyDown,onKeyPress:this.onKeyPress,onFocus:this.onFocus})),Object(o.createElement)("div",u,Object(o.createElement)("label",{htmlFor:`components-form-token-input-${n}`,className:"components-form-token-field__label"},t),Object(o.createElement)("div",{ref:this.bindTokensAndInput,className:l,tabIndex:"-1",onMouseDown:this.onContainerTouched,onTouchStart:this.onContainerTouched},this.renderTokensAndInput(),a&&Object(o.createElement)(g.a,{instanceId:n,match:this.props.saveTransform(this.state.incompleteTokenValue),displayTransform:this.props.displayTransform,suggestions:d,selectedIndex:this.state.selectedSuggestionIndex,scrollIntoView:this.state.selectedSuggestionScroll,onHover:this.onSuggestionHovered,onSelect:this.onSuggestionSelected})),s&&Object(o.createElement)("p",{id:`components-form-token-suggestions-howto-${n}`,className:"components-form-token-field__help"},this.props.tokenizeOnSpace?Object(c.__)("Separate with commas, spaces, or the Enter key."):Object(c.__)("Separate with commas or the Enter key.")))}}y.defaultProps={suggestions:Object.freeze([]),maxSuggestions:100,value:Object.freeze([]),displayTransform:r.identity,saveTransform:e=>e.trim(),onChange:()=>{},onInputChange:()=>{},isBorderless:!1,disabled:!1,tokenizeOnSpace:!1,messages:{added:Object(c.__)("Item added."),removed:Object(c.__)("Item removed."),remove:Object(c.__)("Remove item"),__experimentalInvalid:Object(c.__)("Invalid item")},__experimentalExpandOnFocus:!1,__experimentalValidateInput:()=>!0,__experimentalShowHowTo:!0},t.a=w(Object(a.withInstanceId)(y))},,,,function(e){e.exports=JSON.parse('{"name":"woocommerce/stock-filter","version":"1.0.0","title":"Filter by Stock Controls","description":"Enable customers to filter the product grid by stock status.","category":"woocommerce","keywords":["WooCommerce"],"supports":{"html":false,"multiple":false,"color":true,"inserter":false,"lock":false},"attributes":{"className":{"type":"string","default":""},"headingLevel":{"type":"number","default":3},"showCounts":{"type":"boolean","default":false},"showFilterButton":{"type":"boolean","default":false},"displayStyle":{"type":"string","default":"list"},"selectType":{"type":"string","default":"multiple"},"isPreview":{"type":"boolean","default":false}},"textdomain":"woocommerce","apiVersion":2,"$schema":"https://schemas.wp.org/trunk/block.json"}')},,,,function(e,t){},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var o=n(0),r=n(44),s=n(20),i=n(45),c=n(27),a=n(31),l=n(53),u=n(22);const d=({queryAttribute:e,queryPrices:t,queryStock:n,queryRating:d,queryState:p,isEditor:f=!1})=>{let b=Object(u.a)();b=`${b}-collection-data`;const[m]=Object(a.a)(b),[h,g]=Object(a.b)("calculate_attribute_counts",[],b),[v,O]=Object(a.b)("calculate_price_range",null,b),[w,j]=Object(a.b)("calculate_stock_status_counts",null,b),[y,k]=Object(a.b)("calculate_rating_counts",null,b),E=Object(c.a)(e||{}),S=Object(c.a)(t),_=Object(c.a)(n),x=Object(c.a)(d);Object(o.useEffect)((()=>{"object"==typeof E&&Object.keys(E).length&&(h.find((e=>Object(s.b)(E,"taxonomy")&&e.taxonomy===E.taxonomy))||g([...h,E]))}),[E,h,g]),Object(o.useEffect)((()=>{v!==S&&void 0!==S&&O(S)}),[S,O,v]),Object(o.useEffect)((()=>{w!==_&&void 0!==_&&j(_)}),[_,j,w]),Object(o.useEffect)((()=>{y!==x&&void 0!==x&&k(x)}),[x,k,y]);const[T,C]=Object(o.useState)(f),[L]=Object(r.a)(T,200);T||C(!0);const I=Object(o.useMemo)((()=>(e=>{const t=e;return Array.isArray(e.calculate_attribute_counts)&&(t.calculate_attribute_counts=Object(i.a)(e.calculate_attribute_counts.map((({taxonomy:e,queryType:t})=>({taxonomy:e,query_type:t})))).asc(["taxonomy","query_type"])),t})(m)),[m]);return Object(l.a)({namespace:"/wc/store/v1",resourceName:"products/collection-data",query:{...p,page:void 0,per_page:void 0,orderby:void 0,order:void 0,...I},shouldSelect:L})}},,,,,,,,,,,,,function(e,t,n){"use strict";var o=n(0),r=n(10);const s=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"}));t.a=s},,,,function(e,t,n){"use strict";var o=n(0),r=n(10);const s=Object(o.createElement)(r.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)(r.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));t.a=s},,,,,,,,,function(e,t,n){"use strict";var o=n(0),r=n(1),s=n(25),i=n(76),c=n(153),a=n(27),l=n(54),u=n(31),d=n(136),p=n(2),f=n(86),b=n(63),m=n(62),h=n(61),g=n(55),v=n(85),O=n(14),w=n.n(O),j=n(23),y=n(64),k=n(20),E=n(15),S=n(67),_=n(4),x=n.n(_);const T=[{value:"preview-1",name:"In Stock",label:Object(o.createElement)(g.a,{name:"In Stock",count:3}),textLabel:"In Stock (3)"},{value:"preview-2",name:"Out of stock",label:Object(o.createElement)(g.a,{name:"Out of stock",count:3}),textLabel:"Out of stock (3)"},{value:"preview-3",name:"On backorder",label:Object(o.createElement)(g.a,{name:"On backorder",count:2}),textLabel:"On backorder (2)"}];n(235);var C=n(108),L=n(48);const I=S.a+"stock_status";t.a=({attributes:e,isEditor:t=!1})=>{const n=Object(L.b)(),O=Object(p.getSettingWithCoercion)("isRenderingPhpTemplate",!1,y.a),[_,A]=Object(o.useState)(!1),{outofstock:R,...P}=Object(p.getSetting)("stockStatusOptions",{}),F=Object(o.useRef)(Object(p.getSetting)("hideOutOfStockItems",!1)?P:{outofstock:R,...P}),M=Object(o.useMemo)((()=>Object(C.c)(F.current,I)),[]),[N,B]=Object(o.useState)(M),[D,V]=Object(o.useState)(e.isPreview?T:[]),[W]=Object(o.useState)(Object.entries(F.current).map((([e,t])=>({slug:e,name:t}))).filter((e=>!!e.name)).sort(((e,t)=>e.slug.localeCompare(t.slug)))),[H]=Object(u.a)(),[z,K]=Object(u.b)("stock_status",M),{results:U,isLoading:$}=Object(d.a)({queryStock:!0,queryState:H,isEditor:t}),q=Object(o.useCallback)((e=>Object(k.b)(U,"stock_status_counts")&&Array.isArray(U.stock_status_counts)?U.stock_status_counts.find((({status:t,count:n})=>t===e&&0!==Number(n))):null),[U]),[G,Q]=Object(o.useState)(Object(C.b)());Object(o.useEffect)((()=>{if($||e.isPreview)return;const t=W.map((t=>{const n=q(t.slug);if(!(n||N.includes(t.slug)||(r=t.slug,null!=H&&H.stock_status&&H.stock_status.some((({status:e=[]})=>e.includes(r))))))return null;var r;const s=n?Number(n.count):0;return{value:t.slug,name:Object(j.decodeEntities)(t.name),label:Object(o.createElement)(g.a,{name:Object(j.decodeEntities)(t.name),count:e.showCounts?s:null}),textLabel:e.showCounts?`${Object(j.decodeEntities)(t.name)} (${s})`:Object(j.decodeEntities)(t.name)}})).filter((e=>!!e));V(t),Q(Object(C.b)())}),[e.showCounts,e.isPreview,$,q,N,H.stock_status,W]);const Y="single"!==e.selectType,X=Object(o.useCallback)((e=>{t||(e&&!O&&K(e),(e=>{if(!window)return;if(0===e.length){const e=Object(E.removeQueryArgs)(window.location.href,I);return void(e!==Object(S.e)(window.location.href)&&Object(S.c)(e))}const t=Object(E.addQueryArgs)(window.location.href,{[I]:e.join(",")});t!==Object(S.e)(window.location.href)&&Object(S.c)(t)})(e))}),[t,K,O]);Object(o.useEffect)((()=>{e.showFilterButton||X(N)}),[e.showFilterButton,N,X]);const J=Object(o.useMemo)((()=>z),[z]),Z=Object(a.a)(J),ee=Object(l.a)(Z);Object(o.useEffect)((()=>{w()(ee,Z)||w()(N,Z)||B(Z)}),[N,Z,ee]),Object(o.useEffect)((()=>{_||(K(M),A(!0))}),[K,_,A,M]);const te=Object(o.useCallback)((e=>{const t=e=>{const t=D.find((t=>t.value===e));return t?t.name:null},n=({filterAdded:e,filterRemoved:n})=>{const o=e?t(e):null,i=n?t(n):null;o?Object(s.speak)(Object(r.sprintf)(/* translators: %s stock statuses (for example: 'instock'...) */
Object(r.__)("%s filter added.","woocommerce"),o)):i&&Object(s.speak)(Object(r.sprintf)(/* translators: %s stock statuses (for example:'instock'...) */
Object(r.__)("%s filter removed.","woocommerce"),i))},o=N.includes(e);if(!Y){const t=o?[]:[e];return n(o?{filterRemoved:e}:{filterAdded:e}),void B(t)}if(o){const t=N.filter((t=>t!==e));return n({filterRemoved:e}),void B(t)}const i=[...N,e].sort();n({filterAdded:e}),B(i)}),[N,Y,D]);if(!$&&0===D.length)return n(!1),null;const ne=`h${e.headingLevel}`,oe=!e.isPreview&&!F.current||0===D.length,re=!e.isPreview&&$;if(!Object(p.getSettingWithCoercion)("hasFilterableProducts",!1,y.a))return n(!1),null;const se=Y?!oe&&N.length<D.length:!oe&&0===N.length,ie=Object(o.createElement)(ne,{className:"wc-block-stock-filter__title"},e.heading),ce=oe?Object(o.createElement)(h.a,null,ie):ie;return n(!0),Object(o.createElement)(o.Fragment,null,!t&&e.heading&&ce,Object(o.createElement)("div",{className:x()("wc-block-stock-filter",`style-${e.displayStyle}`,{"is-loading":oe})},"dropdown"===e.displayStyle?Object(o.createElement)(o.Fragment,null,Object(o.createElement)(v.a,{key:G,className:x()({"single-selection":!Y,"is-loading":oe}),suggestions:D.filter((e=>!N.includes(e.value))).map((e=>e.value)),disabled:oe,placeholder:Object(r.__)("Select stock status","woocommerce"),onChange:e=>{!Y&&e.length>1&&(e=e.slice(-1));const t=[e=e.map((e=>{const t=D.find((t=>t.value===e));return t?t.value:e})),N].reduce(((e,t)=>e.filter((e=>!t.includes(e)))));if(1===t.length)return te(t[0]);const n=[N,e].reduce(((e,t)=>e.filter((e=>!t.includes(e)))));1===n.length&&te(n[0])},value:N,displayTransform:e=>{const t=D.find((t=>t.value===e));return t?t.textLabel:e},saveTransform:C.a,messages:{added:Object(r.__)("Stock filter added.","woocommerce"),removed:Object(r.__)("Stock filter removed.","woocommerce"),remove:Object(r.__)("Remove stock filter.","woocommerce"),__experimentalInvalid:Object(r.__)("Invalid stock filter.","woocommerce")}}),se&&Object(o.createElement)(i.a,{icon:c.a,size:30})):Object(o.createElement)(f.a,{className:"wc-block-stock-filter-list",options:D,checked:N,onChange:te,isLoading:oe,isDisabled:re})),Object(o.createElement)("div",{className:"wc-block-stock-filter__actions"},(N.length>0||t)&&!oe&&Object(o.createElement)(m.a,{onClick:()=>{B([]),X([])},screenReaderLabel:Object(r.__)("Reset stock filter","woocommerce")}),e.showFilterButton&&Object(o.createElement)(b.a,{className:"wc-block-stock-filter__button",isLoading:oe,disabled:oe||re,onClick:()=>X(N)})))}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){e.exports=n(265)},function(e,t,n){"use strict";n.r(t);var o=n(50),r=n(162),s=n(108);Object(o.a)({selector:".wp-block-woocommerce-stock-filter",Block:r.a,getProps:e=>({attributes:Object(s.d)(e.dataset),isEditor:!1})})}]);